<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>URL.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<style type="text/css" media="screen">
    body {background-color:white;}
    body,div,p,dl,.memname, .params, .exception {font: normal normal normal 16px/22px "HelveticaNeue", Helvetica, "Arial Narrow", Arial, sans-serif;}
    #nav-path {display:none;}
    h2:first-of-type {margin-top:2px; border:none;}
    h2.groupheader {font-size:26px; line-height:28px;color:#286796;}
    div.groupheader { font-weight:600; font-size:18px;color: rgb(51, 51, 51);}
    h3 {font-size:20px;color: rgb(51, 51, 51);}
    div.header { background-image:none; background-color: #3b96d7; color:white;}
    div.title {text-align:center;font-size: 28px; font-weight:100;}
    .summary {display:none;}
    dl.section {border:none;}
    .memproto > *, .memitem > * {
            box-shadow: none!important;
            -moz-box-shadow: none!important;
            -webkit-box-shadow: none!important;
            background-image:none!important;
    }
    .memproto {
            border-bottom: 1px #b8c8e9 solid;
            background-color: #f7fcff;
    }
    .textinfo {color: #428bca;}
    .textnote {color: #a94442;}
</style>
</head><body>
<!-- Generated by Doxygen 1.8.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_bb61871b4c63e4e6685a8d6c52430594.html">zdb</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">URL.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><b>URL</b> represent an immutable Uniform Resource Locator. </p>
<p>A Uniform Resource Locator (URL), is used to uniquely identify a resource on the Internet. The URL is a compact text string with a restricted syntax that consists of four main components: </p>
<center><code> &lt;protocol&gt;://&lt;authority&gt;&lt;path&gt;?&lt;query&gt; </code></center><p>The &lt;protocol&gt; part is mandatory, the other components may or may not be present in an URL string. For instance the <code>file</code> protocol only use the path component while a <code>http</code> protocol may use all components. Here is an example where all components are used:</p>
<pre>
<a href="http://user:password@www.foo.bar:8080/document/index.csp?querystring#ref">http://user:password@www.foo.bar:8080/document/index.csp?querystring#ref</a>
</pre><p>The following URL components are automatically unescaped according to the escaping mechanism defined in RFC 2396; <code>credentials</code>, <code>path</code> and parameter <code>values</code>.</p>
<p>For more information about the URL syntax and specification, see, <a href="ftp://ftp.rfc-editor.org/in-notes/rfc2396.txt">RFC2396 - Uniform Resource Identifiers (URI): Generic Syntax</a> </p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a0acb682b8260ab1c60b918599864e2e5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a0acb682b8260ab1c60b918599864e2e5">T</a>&#160;&#160;&#160;URL_T</td></tr>
<tr class="separator:a0acb682b8260ab1c60b918599864e2e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ad715731329590a33bd1e32189213c0f6"><td class="memItemLeft" align="right" valign="top">typedef struct URL_S *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#ad715731329590a33bd1e32189213c0f6">T</a></td></tr>
<tr class="separator:ad715731329590a33bd1e32189213c0f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a1e85f50a8c6036c34b642a49cc08d5fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a1e85f50a8c6036c34b642a49cc08d5fb">URL_new</a> (const char *url)</td></tr>
<tr class="memdesc:a1e85f50a8c6036c34b642a49cc08d5fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new URL object from the <code>url</code> parameter string.  <a href="#a1e85f50a8c6036c34b642a49cc08d5fb">More...</a><br/></td></tr>
<tr class="separator:a1e85f50a8c6036c34b642a49cc08d5fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47232899a21dc2c53576d071f169d827"><td class="memItemLeft" align="right" valign="top"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a47232899a21dc2c53576d071f169d827">URL_create</a> (const char *url,...)</td></tr>
<tr class="memdesc:a47232899a21dc2c53576d071f169d827"><td class="mdescLeft">&#160;</td><td class="mdescRight">Factory method for building an URL object using a variable argument list.  <a href="#a47232899a21dc2c53576d071f169d827">More...</a><br/></td></tr>
<tr class="separator:a47232899a21dc2c53576d071f169d827"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3dc09880813e8dd994333ae37534c0d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#ad3dc09880813e8dd994333ae37534c0d">URL_free</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> *U)</td></tr>
<tr class="memdesc:ad3dc09880813e8dd994333ae37534c0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy a URL object.  <a href="#ad3dc09880813e8dd994333ae37534c0d">More...</a><br/></td></tr>
<tr class="separator:ad3dc09880813e8dd994333ae37534c0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63f81fa482efdabd205cf78e4e98a2dc"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a63f81fa482efdabd205cf78e4e98a2dc">URL_toString</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:a63f81fa482efdabd205cf78e4e98a2dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a string representation of this URL object.  <a href="#a63f81fa482efdabd205cf78e4e98a2dc">More...</a><br/></td></tr>
<tr class="separator:a63f81fa482efdabd205cf78e4e98a2dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Properties</div></td></tr>
<tr class="memitem:a5935142198a699d229d70f86e82818af"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a5935142198a699d229d70f86e82818af">URL_getProtocol</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:a5935142198a699d229d70f86e82818af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the protocol of the URL.  <a href="#a5935142198a699d229d70f86e82818af">More...</a><br/></td></tr>
<tr class="separator:a5935142198a699d229d70f86e82818af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacaa1aec7e9ade15ebfc22dd41735433"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#aacaa1aec7e9ade15ebfc22dd41735433">URL_getUser</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:aacaa1aec7e9ade15ebfc22dd41735433"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the user name from the authority part of the URL.  <a href="#aacaa1aec7e9ade15ebfc22dd41735433">More...</a><br/></td></tr>
<tr class="separator:aacaa1aec7e9ade15ebfc22dd41735433"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3dcc48c833113b7f0e0761a5c3d64d6"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#ad3dcc48c833113b7f0e0761a5c3d64d6">URL_getPassword</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:ad3dcc48c833113b7f0e0761a5c3d64d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the password from the authority part of the URL.  <a href="#ad3dcc48c833113b7f0e0761a5c3d64d6">More...</a><br/></td></tr>
<tr class="separator:ad3dcc48c833113b7f0e0761a5c3d64d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0c4f1729a8813497b07739161a3c6a6"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#ac0c4f1729a8813497b07739161a3c6a6">URL_getHost</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:ac0c4f1729a8813497b07739161a3c6a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the hostname of the URL.  <a href="#ac0c4f1729a8813497b07739161a3c6a6">More...</a><br/></td></tr>
<tr class="separator:ac0c4f1729a8813497b07739161a3c6a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72bd52429ecfcddac421a0fe33d0dc76"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a72bd52429ecfcddac421a0fe33d0dc76">URL_getPort</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:a72bd52429ecfcddac421a0fe33d0dc76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the port of the URL.  <a href="#a72bd52429ecfcddac421a0fe33d0dc76">More...</a><br/></td></tr>
<tr class="separator:a72bd52429ecfcddac421a0fe33d0dc76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1d31ab7c8cb60a17a6f6ae5908562a0"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#ae1d31ab7c8cb60a17a6f6ae5908562a0">URL_getPath</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:ae1d31ab7c8cb60a17a6f6ae5908562a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the path of the URL.  <a href="#ae1d31ab7c8cb60a17a6f6ae5908562a0">More...</a><br/></td></tr>
<tr class="separator:ae1d31ab7c8cb60a17a6f6ae5908562a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef8b66bf7af385f19cdef37a146883c5"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#aef8b66bf7af385f19cdef37a146883c5">URL_getQueryString</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:aef8b66bf7af385f19cdef37a146883c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the query string of the URL.  <a href="#aef8b66bf7af385f19cdef37a146883c5">More...</a><br/></td></tr>
<tr class="separator:aef8b66bf7af385f19cdef37a146883c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd0b689bc94dd9691eb2176d7e33c0e5"><td class="memItemLeft" align="right" valign="top">const char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#abd0b689bc94dd9691eb2176d7e33c0e5">URL_getParameterNames</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U)</td></tr>
<tr class="memdesc:abd0b689bc94dd9691eb2176d7e33c0e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an array of string objects with the names of the parameters contained in this URL.  <a href="#abd0b689bc94dd9691eb2176d7e33c0e5">More...</a><br/></td></tr>
<tr class="separator:abd0b689bc94dd9691eb2176d7e33c0e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff59eddfcccae220998b9955af59267c"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#aff59eddfcccae220998b9955af59267c">URL_getParameter</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> U, const char *name)</td></tr>
<tr class="memdesc:aff59eddfcccae220998b9955af59267c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value of a URL parameter as a string, or NULL if the parameter does not exist.  <a href="#aff59eddfcccae220998b9955af59267c">More...</a><br/></td></tr>
<tr class="separator:aff59eddfcccae220998b9955af59267c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Class methods</div></td></tr>
<tr class="memitem:aee9ecaebd7994ccb6d5df86485c0edac"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#aee9ecaebd7994ccb6d5df86485c0edac">URL_unescape</a> (char *url)</td></tr>
<tr class="memdesc:aee9ecaebd7994ccb6d5df86485c0edac"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Class method</b>, unescape an url string.  <a href="#aee9ecaebd7994ccb6d5df86485c0edac">More...</a><br/></td></tr>
<tr class="separator:aee9ecaebd7994ccb6d5df86485c0edac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4462b77aa13275d47a954b6d5ccf8d9e"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a4462b77aa13275d47a954b6d5ccf8d9e">URL_escape</a> (const char *url)</td></tr>
<tr class="memdesc:a4462b77aa13275d47a954b6d5ccf8d9e"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Class method</b>, escape an url string converting unsafe characters to a hex (%HEXHEX) representation.  <a href="#a4462b77aa13275d47a954b6d5ccf8d9e">More...</a><br/></td></tr>
<tr class="separator:a4462b77aa13275d47a954b6d5ccf8d9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45a90b3b62d344fff67f61337c3c9cb0"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="URL_8h.html#a45a90b3b62d344fff67f61337c3c9cb0">URL_normalize</a> (char *path)</td></tr>
<tr class="memdesc:a45a90b3b62d344fff67f61337c3c9cb0"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Class method</b>, normalize an URL path string.  <a href="#a45a90b3b62d344fff67f61337c3c9cb0">More...</a><br/></td></tr>
<tr class="separator:a45a90b3b62d344fff67f61337c3c9cb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a0acb682b8260ab1c60b918599864e2e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;&#160;&#160;URL_T</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ad715731329590a33bd1e32189213c0f6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct URL_S* <a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a1e85f50a8c6036c34b642a49cc08d5fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> URL_new </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>url</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new URL object from the <code>url</code> parameter string. </p>
<p>The url string <em>must</em> start with a protocol specifier, such as <code><a href="http://">http://</a></code> or <code><a href="ftp://">ftp://</a></code> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>A string specifying the URL </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A URL object or NULL if the <code>url</code> parameter cannot be parsed as an URL. </dd></dl>

</div>
</div>
<a class="anchor" id="a47232899a21dc2c53576d071f169d827"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> URL_create </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Factory method for building an URL object using a variable argument list. </p>
<p><em>Important</em>: since the '%' character is used as a format specifier (e.g. %s for string, %d for integer and so on), submitting an URL escaped string (i.e. a %HEXHEX encoded string) in the <code>url</code> parameter can produce undesired results. In this case, use either the <a class="el" href="URL_8h.html#a1e85f50a8c6036c34b642a49cc08d5fb" title="Create a new URL object from the url parameter string. ">URL_new()</a> method or <a class="el" href="URL_8h.html#aee9ecaebd7994ccb6d5df86485c0edac" title="Class method, unescape an url string. ">URL_unescape()</a> the <code>url</code> parameter first. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>A string specifying the URL </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A URL object or NULL if the <code>url</code> parameter cannot be parsed as an URL. </dd></dl>

</div>
</div>
<a class="anchor" id="ad3dc09880813e8dd994333ae37534c0d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void URL_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> *&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroy a URL object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>A URL object reference </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5935142198a699d229d70f86e82818af"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getProtocol </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the protocol of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The protocol name </dd></dl>

</div>
</div>
<a class="anchor" id="aacaa1aec7e9ade15ebfc22dd41735433"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getUser </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the user name from the authority part of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A username specified in the URL or NULL if not found </dd></dl>

</div>
</div>
<a class="anchor" id="ad3dcc48c833113b7f0e0761a5c3d64d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getPassword </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the password from the authority part of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A password specified in the URL or NULL if not found </dd></dl>

</div>
</div>
<a class="anchor" id="ac0c4f1729a8813497b07739161a3c6a6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getHost </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the hostname of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The hostname of the URL or NULL if not found </dd></dl>

</div>
</div>
<a class="anchor" id="a72bd52429ecfcddac421a0fe33d0dc76"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int URL_getPort </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the port of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The port number of the URL or -1 if not specified </dd></dl>

</div>
</div>
<a class="anchor" id="ae1d31ab7c8cb60a17a6f6ae5908562a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getPath </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the path of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The path of the URL or NULL if not found </dd></dl>

</div>
</div>
<a class="anchor" id="aef8b66bf7af385f19cdef37a146883c5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getQueryString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the query string of the URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The query string of the URL or NULL if not found </dd></dl>

</div>
</div>
<a class="anchor" id="abd0b689bc94dd9691eb2176d7e33c0e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char** URL_getParameterNames </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns an array of string objects with the names of the parameters contained in this URL. </p>
<p>If the URL has no parameters, the method returns NULL. The last value in the array is NULL. To print all parameter names and their values contained in this URL, the following code can be used: </p>
<pre>
  const char **params = URL_getParameterNames(U);
  if (params) 
          for (int i = 0; params[i]; i++)
                  printf("%s = %s\n", params[i], URL_getParameter(U, params[i]));
</pre> <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An array of string objects, each string containing the name of a URL parameter; or NULL if the URL has no parameters </dd></dl>

</div>
</div>
<a class="anchor" id="aff59eddfcccae220998b9955af59267c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_getParameter </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the value of a URL parameter as a string, or NULL if the parameter does not exist. </p>
<p>If you use this method with a multi-valued parameter, the value returned is the first value found. Lookup is <em>case-sensitive</em>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
    <tr><td class="paramname">name</td><td>The parameter name to lookup </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The parameter value or NULL if not found </dd></dl>

</div>
</div>
<a class="anchor" id="a63f81fa482efdabd205cf78e4e98a2dc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* URL_toString </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>U</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a string representation of this URL object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">U</td><td>An URL object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The URL string </dd></dl>

</div>
</div>
<a class="anchor" id="aee9ecaebd7994ccb6d5df86485c0edac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* URL_unescape </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>url</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Class method</b>, unescape an url string. </p>
<p>The <code>url</code> parameter is modified by this method. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>an escaped url string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the unescaped <code>url</code> string </dd></dl>

</div>
</div>
<a class="anchor" id="a4462b77aa13275d47a954b6d5ccf8d9e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* URL_escape </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>url</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Class method</b>, escape an url string converting unsafe characters to a hex (%HEXHEX) representation. </p>
<p>The following URL unsafe characters are encoded: </p>
<pre>&lt;&gt;"#%%{}|\^ [] `</pre><p> as well as characters in the interval 00-1F hex (0-31 decimal) and in the interval 7F-FF (127-255 decimal) <em>The caller must free the returned string.</em> If the <code>url</code> parameter is NULL then this method returns NULL, if it is the empty string "" a <em>new</em> empty string is returned. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>an url string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the escaped string </dd></dl>

</div>
</div>
<a class="anchor" id="a45a90b3b62d344fff67f61337c3c9cb0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* URL_normalize </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Class method</b>, normalize an URL path string. </p>
<p>The <code>path</code> parameter is modified by this method. Examples: </p>
<table class="doxtable">
<tr>
<td><b>path</b></td><td><b>normalized path</b> </td></tr>
<tr>
<td>/foo//</td><td>/foo/ </td></tr>
<tr>
<td>/foo/./</td><td>/foo/ </td></tr>
<tr>
<td>/foo/../bar</td><td>/bar </td></tr>
<tr>
<td>/foo/../bar/</td><td>/bar/ </td></tr>
<tr>
<td>/foo/../bar/../baz</td><td>/baz </td></tr>
<tr>
<td>//foo//./bar</td><td>/foo/bar </td></tr>
<tr>
<td>/../foo</td><td>/foo </td></tr>
<tr>
<td>/a/../b/../../x</td><td>/x </td></tr>
<tr>
<td>/.././../</td><td>/ </td></tr>
<tr>
<td>/..</td><td>/ </td></tr>
</table>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>The path to normalize </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the normalized <code>path</code> string. </dd></dl>

</div>
</div>
</div><!-- contents -->
<p style="text-align:center;color:#808080;font-size:90%;margin:40px 0 20px 0;">
Copyright &copy; <a href="http://tildeslash.com/">Tildeslash Ltd</a>. All
rights reserved.</p>
</body></html>
